<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/painting/qpaintengine_raster.cpp -->
<head>
  <title>Qt 4.3: QRasterPaintEngine Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QRasterPaintEngine Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QRasterPaintEngine class enables hardware acceleration of painting operations in Qtopia Core. <a href="#details">More...</a></p>
<pre> #include &lt;QRasterPaintEngine&gt;</pre><p><b>This class is under development and is subject to change.</b></p>
<p>Inherits <a href="qpaintengine.html">QPaintEngine</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qrasterpaintengine-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qrasterpaintengine.html#QRasterPaintEngine">QRasterPaintEngine</a></b> ()</li>
<li><div class="fn"/><b><a href="qrasterpaintengine.html#dtor.QRasterPaintEngine">~QRasterPaintEngine</a></b> ()</li>
<li><div class="fn"/>virtual void <b><a href="qrasterpaintengine.html#drawBufferSpan">drawBufferSpan</a></b> ( const uint * <i>buffer</i>, int <i>size</i>, int <i>x</i>, int <i>y</i>, int <i>length</i>, uint <i>alpha</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qrasterpaintengine.html#drawColorSpans">drawColorSpans</a></b> ( const QSpan * <i>spans</i>, int <i>count</i>, uint <i>color</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qrasterpaintengine.html#drawEllipse">drawEllipse</a></b> ( const QRect &amp; <i>rect</i> )</li>
<li><div class="fn"/>virtual void <b><a href="qrasterpaintengine.html#drawPoints">drawPoints</a></b> ( const QPoint * <i>points</i>, int <i>pointCount</i> )</li>
</ul>
<ul>
<li><div class="fn"/>24 public functions inherited from <a href="qpaintengine.html#public-functions">QPaintEngine</a></li>
</ul>
<a name="related-non-members"></a>
<h3>Related Non-Members</h3>
<ul>
<li><div class="fn"/>typedef <b><a href="qrasterpaintengine.html#QSpan-typedef">QSpan</a></b></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QRasterPaintEngine class enables hardware acceleration of painting operations in Qtopia Core.</p>
<p>Note that this functionality is only available in <a href="qtopiacore.html">Qtopia Core</a>.</p>
<p>In <a href="qtopiacore.html">Qtopia Core</a>, painting is a pure software implementation. But starting with <a href="qtopiacore.html">Qtopia Core</a> 4.2, it is possible to add an accelerated graphics driver to take advantage of available hardware resources.</p>
<p>Hardware acceleration is accomplished by creating a custom screen driver, accelerating the copying from memory to the screen, and implementing a custom paint engine accelerating the various painting operations. Then a custom paint device (derived from the <a href="qcustomrasterpaintdevice.html">QCustomRasterPaintDevice</a> class) and a custom window surface (derived from QWSWindowSurface) must be implemented to make <a href="qtopiacore.html">Qtopia Core</a> aware of the accelerated driver.</p>
<p><b>Note:</b> The QRasterPaintEngine class does not support 8-bit images. Instead, they need to be converted to a supported format, such as <a href="qimage.html#Format-enum">QImage::Format_ARGB32_Premultiplied</a>.</p>
<p>See the <a href="qtopiacore-accel.html">Adding an Accelerated Graphics Driver in Qtopia Core</a> documentation for details.</p>
<p>See also <a href="qcustomrasterpaintdevice.html">QCustomRasterPaintDevice</a> and <a href="qpaintengine.html">QPaintEngine</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QRasterPaintEngine"></a>QRasterPaintEngine::QRasterPaintEngine ()</h3>
<p>Creates a raster based paint engine with the complete set of <a href="qpaintengine.html#PaintEngineFeature-enum">paint engine features and capabilities</a>.</p>
<h3 class="fn"><a name="dtor.QRasterPaintEngine"></a>QRasterPaintEngine::~QRasterPaintEngine ()</h3>
<p>Destroys this paint engine.</p>
<h3 class="fn"><a name="drawBufferSpan"></a>void QRasterPaintEngine::drawBufferSpan ( const <a href="qtglobal.html#uint-typedef">uint</a> * <i>buffer</i>, int <i>size</i>, int <i>x</i>, int <i>y</i>, int <i>length</i>, <a href="qtglobal.html#uint-typedef">uint</a> <i>alpha</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Draws the given <i>buffer</i>.</p>
<p>The default implementation does nothing; reimplement this function to draw a buffer that contains more than one color. Note that this function <i>must</i> be reimplemented if the framebuffer is not memory-mapped.</p>
<p>The <i>size</i> parameter specifies the total size of the given <i>buffer</i>, while the <i>length</i> parameter specifies the number of pixels to draw. The buffer's position is given by (<i>x</i>, <i>y</i>). The provided <i>alpha</i> value is added to each pixel in the buffer when drawing.</p>
<p>See also <a href="qrasterpaintengine.html#drawColorSpans">drawColorSpans</a>().</p>
<h3 class="fn"><a name="drawColorSpans"></a>void QRasterPaintEngine::drawColorSpans ( const <a href="qrasterpaintengine.html#QSpan-typedef">QSpan</a> * <i>spans</i>, int <i>count</i>, <a href="qtglobal.html#uint-typedef">uint</a> <i>color</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Draws the given color <i>spans</i> with the specified <i>color</i>. The <i>count</i> parameter specifies the number of spans.</p>
<p>The default implementation does nothing; reimplement this function to draw the given color <i>spans</i> with the specified <i>color</i>. Note that this function <i>must</i> be reimplemented if the framebuffer is not memory-mapped.</p>
<p>See also <a href="qrasterpaintengine.html#drawBufferSpan">drawBufferSpan</a>().</p>
<h3 class="fn"><a name="drawEllipse"></a>void QRasterPaintEngine::drawEllipse ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplement this function to draw the largest ellipse that can be contained within rectangle <i>rect</i>.</p>
<p>Reimplemented from <a href="qpaintengine.html#drawEllipse-2">QPaintEngine</a>.</p>
<h3 class="fn"><a name="drawPoints"></a>void QRasterPaintEngine::drawPoints ( const <a href="qpoint.html">QPoint</a> * <i>points</i>, int <i>pointCount</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Draws the first <i>pointCount</i> points in the buffer <i>points</i></p>
<p>The default implementation converts the first <i>pointCount</i> QPoints in <i>points</i> to QPointFs and calls the floating point version of drawPoints.</p>
<p>Reimplemented from <a href="qpaintengine.html#drawPoints-2">QPaintEngine</a>.</p>
<hr />
<h2>Related Non-Members</h2>
<h3 class="fn"><a name="QSpan-typedef"></a>typedef QSpan</h3>
<p>A struct equivalent to QT_FT_Span, containing a position (x, y), the span's length in pixels and its color/coverage (a value ranging from 0 to 255).</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
